﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ATMAaronKnoll
{
    class Deposits
    {
        int deposits;
        public void DisplayDepositMenu(string depositTranType)
        {
            //bool runApp = true; 

            Console.WriteLine("\nHow much would you like to deposit?");
            Console.WriteLine("\n\t1 - $20");
            Console.WriteLine("\t2 - $40");
            Console.WriteLine("\t3 - $60");            
            Console.WriteLine("\t4 - $100");
            Console.WriteLine("\t5 - $200");
            Console.WriteLine("\t6 - $10000");
            Console.WriteLine("\t7 - Cancel Transaction");
            Console.Write("\nPlease enter a numeric option: ");
            ConsoleKeyInfo keyPressed = Console.ReadKey();
            if (keyPressed.Key == ConsoleKey.NumPad6)
            {
                Console.Clear();
            }
            else
                switch (keyPressed.Key)
            {
                case ConsoleKey.NumPad1:
                case ConsoleKey.D1:
                    deposits = 20;
                    break;

                case ConsoleKey.NumPad2:
                case ConsoleKey.D2:
                    deposits = 40;
                    break;

                case ConsoleKey.NumPad3:
                case ConsoleKey.D3:
                    deposits = 60;
                    break;

                case ConsoleKey.NumPad4:
                    case ConsoleKey.D4:
                    deposits = 100;
                    break;

                case ConsoleKey.NumPad5:
                case ConsoleKey.D5:
                    deposits = 200;
                    break;

                case ConsoleKey.NumPad6:
                case ConsoleKey.D6:
                    deposits = 10000;
                    break;

                case ConsoleKey.NumPad7:
                case ConsoleKey.D7:
                    Console.WriteLine("\n\nPress any key to return to the main menu.");
                    Console.ReadKey();
                    Console.Clear();
                    break;

            }
            Accounts.DepositCash(deposits);
            Console.Clear();
            Console.WriteLine("\nPlease Wait...");
            System.Threading.Thread.Sleep(2000);
            Console.Write("\nThank you for your deposit. $" + deposits + ".00 will be added to you account. \nNow returning to the main menu...");
            System.Threading.Thread.Sleep(3500);
            Console.Clear();

    
        }
    }
}